{% extends 'layout.html' %}

{% block content %}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title"><i class="glyphicon glyphicon-th"></i> 数据列表</h3>
        </div>
        <div class="panel-body">
            <form class="form-inline" role="form" style="float:left;">
                <div class="form-group has-feedback">
                    <div class="input-group">
                        <div class="input-group-addon">查询条件</div>
                        <input class="form-control has-success" placeholder="请输入查询条件" type="text">
                    </div>
                </div>
                <button class="btn btn-warning" type="button"><i class="glyphicon glyphicon-search"></i> 查询</button>
            </form>
            <button class="btn btn-danger" style="float:right;margin-left:10px;" type="button"><i
                    class=" glyphicon glyphicon-remove"></i> 删除
            </button>
            <button class="btn btn-primary" onclick="window.location.href='/label/add/'" style="float:right;"
                    type="button"><i class="glyphicon glyphicon-plus"></i> 新增
            </button>
            <br>
            <hr style="clear:both;">
            <div class="table-responsive">
                <table class="table  table-bordered">
                    <thead>
                    <tr>
                        <th width="30">#</th>
                        <th width="30"><input type="checkbox"></th>
                        <th>名称</th>
                        <th>上一级菜单</th>
                        <th width="100">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% for obj in label_queryset %}
                    <tr>
                        <td>{{ obj.id }}</td>
                        <td><input type="checkbox"></td>
                        <td>{{ obj.label_name }}</td>
                        <td>{{ obj.previous_label }}</td>
                        <td>
                            <a class="btn btn-success btn-xs"><i class="glyphicon glyphicon-check"></i></a>
                            <a class="btn btn-primary btn-xs" href="/label/{{ obj.id }}/edit/"><i
                                    class="glyphicon glyphicon-pencil"></i></a>
                            <a class="btn btn-danger btn-xs" href="/label/delete/?nid={{ obj.id }}"><i
                                    class="glyphicon glyphicon-remove"></i></a>
                        </td>
                    </tr>
                    {% endfor %}
                    </tbody>
                    <tfoot>
                    <tr>
                        <td align="center" colspan="6">
                            <ul class="pagination">
                                <li class="disabled"><a href="#">上一页</a></li>
                                <li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li>
                                <li><a href="#">2</a></li>
                                <li><a href="#">3</a></li>
                                <li><a href="#">4</a></li>
                                <li><a href="#">5</a></li>
                                <li><a href="#">下一页</a></li>
                            </ul>
                        </td>
                    </tr>

                    </tfoot>
                </table>
            </div>
        </div>
    </div>
</div>
{% endblock %}